

#import "BaseNavigationController.h"

@interface BaseNavigationController ()

@end

@implementation BaseNavigationController

- (void)viewDidLoad {
    [super viewDidLoad];
    self.navigationBar.translucent = NO;
    [self.navigationBar setShadowImage:[UIImage imageWithColor:[UIColor clearColor]]];
}


- (void)pushViewController:(UIViewController *)viewController animated:(BOOL)animated
{
    if (self.viewControllers.count > 0)
    {
        viewController.hidesBottomBarWhenPushed = YES;
    }
    [super pushViewController:viewController animated:animated];
}
- (UIViewController *)popViewControllerAnimated:(BOOL)animated{
    if (self.childViewControllers.count <= 2) {
        self.tabBarController.tabBar.hidden = NO;
    }
    UIViewController *viewController = [super popViewControllerAnimated:animated];
    return viewController;
}
- (UIViewController *)childViewControllerForStatusBarStyle {
 return self.topViewController;
}

@end
